package com.tvein.sanguo.chat.controller
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.command.SimpleFabricationCommand;	
	//custom
	import com.tvein.sanguo.Chat;
	import com.tvein.sanguo.chat.model.SystemProxy;
	import com.tvein.sanguo.chat.model.MessageProxy;
	import com.tvein.sanguo.chat.view.ChatMediator;
	import com.tvein.sanguo.chat.view.SystemMediator;
//
	public class ChatStartupCommand extends SimpleFabricationCommand
	{
		override public function execute(note:INotification):void
		{
			var chat:Chat = note.getBody() as Chat;
			
			facade.registerProxy(new SystemProxy());
			facade.registerProxy(new MessageProxy());
			
			registerMediator(new SystemMediator(chat));
			registerMediator(new ChatMediator(chat));
		}
	}
}